<template>
  <div class="login">
    <div class="login_container">
      <h2 class="text">后台管理系统</h2>
      <LoginPanel ref="LoginPanelRef"></LoginPanel>
      <div class="login_footer">
        <div class="login_memer">
          <el-checkbox v-model="isKeepLogin" label="记住密码" size="large"></el-checkbox>
           <el-link type="primary" class="ignorement">忘记密码</el-link>
        </div>
      </div>
      <div class="login_go">
        <el-button type="primary" @click="buttonHandClick">立即登录</el-button>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import LoginPanel from './cpns/login-panel.vue'
export default defineComponent({
  components: {
    LoginPanel
  },
  setup () {
    const isKeepLogin = ref(true)
    // const LoginPanelRef = ref()
    const LoginPanelRef = ref<InstanceType<typeof LoginPanel>>()
    const buttonHandClick = () => {
      console.log("立即登录")
      LoginPanelRef.value?.loginPaleFunction(isKeepLogin.value)
    }
    return {
      isKeepLogin,
      buttonHandClick,
      LoginPanelRef
    }
  }
});
</script>

<style lang="less">
.login {
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.text {
  text-align: center;
}
.login_footer {
  width: 100%;
  height: 30px;
}
.login_memer {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
}
.login_go {
  width: 100%;
  height: 50px;
  button {
    width: 100%;
    margin: 10px 0 0 0;
  }
}
</style>
